/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import javax.swing.SwingWorker;
import view.BusquedaPaquete;
import view.EstadoRegistro;
import view.SimuTracking;

/**
 *
 * @author Enrique
 */
public class WorkerTracking extends SwingWorker<Void, Integer>{

    private BusquedaPaquete ventana;
    private int numFila;
    private EstadoRegistro ventanaEspera;
    
    public WorkerTracking(BusquedaPaquete ventana, int numFila, EstadoRegistro ventanaEspera) {
        this.ventana = ventana;
        this.numFila = numFila;
        this.ventanaEspera = ventanaEspera;
    }

    @Override
    protected Void doInBackground() throws Exception {
        SimuTracking ventanaTracking = new SimuTracking(this.ventana.getListaFilasTablaPaquetes().get(numFila));
        ventanaEspera.dispose();
        ventanaTracking.setVisible(true);
        return null;
    }
    
}
